home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / tclib20.zip / STRINGHK.H < prev    next >
C/C++ Source or Header  |  1988-12-03  |  2KB  |  41 lines

  1. /* TCHK 2.0 - Howard Kapustein's Turbo C library       12-3-88 */
  2. /* Copyright (C) 1988, Howard Kapustein.  All rights reserved. */
  3.  
  4. /* stringhk.h  -  Howard Kapustein's string header file */
  5.  
  6. #ifndef STRINGHK_HEADER
  7. #define STRINGHK_HEADER 1
  8.  
  9. #include <howard.h>
  10.  
  11. #ifndef STRING_DEFINES
  12. #define endstri(s)      (strlen(s)-1)      /* end of string, integer */
  13. #define endstrp(s)      (s+endstri(s))     /* end of string, pointer */
  14. #define STRING_DEFINES  1
  15. #endif
  16.  
  17. /* function prototypes */
  18. int intlen(char *number);       /* find length of integer part of string */
  19. char *strcomma(char *source);   /* convert a string to xx,xxx,xxx format */
  20. char *strtodol(char *source);   /* convert string to $ format */
  21. char *ltrim(char *source);             /* trim blanks on left */
  22. char *rtrim(char *source);             /* trim blanks on right */
  23. char *atrim(char *source);             /* trim blanks on left & right */
  24. char *strins(char *source, char *new, char *ptr);      /* string insert */
  25. char *strdel(char *source, char *old); /* string delete */
  26. char *strrep(char c, int len);         /* replicate c len times */
  27. char *strfill(char *str, char c, int count);    /* fill string str with c count times */
  28. char *leftstr(char *source, int len);  /* LEFT$(SOURCE$,len) */
  29. char *rightstr(char *source, int len); /* RIGHT$(SOURCE$,len) */
  30. char *midstr(char *source, int begin, int len);  /* MID$(SOURCE$,begin,len) */
  31. char *strshleft(char *source, int count);    /* shift string left count chars */
  32. char *strshright(char *source, int count);   /* shift string right count chars */
  33. char *strclean(char *str);             /* remove non-printable ASCII codes */
  34. char *strcapital(char *str);           /* capitalize first letter of each word */
  35. int stroccur(char *str, char *substr); /* # occurences of substring in string */
  36. int strwcmp(char *wstr, char *str);    /* compare wildcard w/string (*,?) */
  37. int strwicmp(char *wstr, char *str);   /* compare wildcard w/string (*,?), ignore case */
  38. char *strtocomma(char *source);   /* convert a string to xx,xxx,xxx format */
  39.  
  40. #endif              /* STRINGHK_HEADER */
  41.